﻿using System;
using System.Runtime.Serialization;

namespace SilverCrmSoap.CrmSdk
{
    [DataContract]
    public class UserOwnedEntity : Entity
    {
        [DataMember]
        public EntityReference CreatedBy
        {
            get
            {
                return GetAttributeValue<EntityReference>("createdby");
            }
        }

        [DataMember]
        public EntityReference CreatedOnBehalfBy
        {
            get
            {
                return GetAttributeValue<EntityReference>("createdonbehalfby");
            }
        }

        [DataMember]
        public Nullable<DateTime> CreatedOn
        {
            get
            {
                return GetAttributeValue<Nullable<DateTime>>("createdon");
            }
        }

        [DataMember]
        public EntityReference ModifiedBy
        {
            get
            {
                return GetAttributeValue<EntityReference>("modifiedby");
            }
        }

        [DataMember]
        public Nullable<DateTime> ModifiedOn
        {
            get
            {
                return GetAttributeValue<Nullable<DateTime>>("modifiedon");
            }
        }

        [DataMember]
        public EntityReference ModifiedOnBehalfBy
        {
            get
            {
                return GetAttributeValue<EntityReference>("modifiedonbehalfby");
            }
        }

        [DataMember]
        public EntityReference Owner
        {
            get
            {
                return GetAttributeValue<EntityReference>("ownerid");
            }
            set
            {
                SetAttributeValue("ownerid", value);
            }
        }
    }
}
